3.1.19 \(\int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx\) [19]

Optimal. Leaf size=71 \[ -\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x}-\frac {1}{2} \left (2 c+a d^2\right ) \tanh ^{-1}\left (\sqrt {1-d^2 x^2}\right ) \]

[Out]

-1/2*(a*d^2+2*c)*arctanh((-d^2*x^2+1)^(1/2))-1/2*a*(-d^2*x^2+1)^(1/2)/x^2-b*(-d^2*x^2+1)^(1/2)/x

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1623, 1821, 821, 272, 65, 214} \begin {gather*} -\frac {1}{2} \left (a d^2+2 c\right ) \tanh ^{-1}\left (\sqrt {1-d^2 x^2}\right )-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x + c*x^2)/(x^3*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]

[Out]

-1/2*(a*Sqrt[1 - d^2*x^2])/x^2 - (b*Sqrt[1 - d^2*x^2])/x - ((2*c + a*d^2)*ArcTanh[Sqrt[1 - d^2*x^2]])/2

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 821

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(-(e*f - d*g
))*(d + e*x)^(m + 1)*((a + c*x^2)^(p + 1)/(2*(p + 1)*(c*d^2 + a*e^2))), x] + Dist[(c*d*f + a*e*g)/(c*d^2 + a*e
^2), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0
] && EqQ[Simplify[m + 2*p + 3], 0]

Rule 1623

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[P
x*(a*c + b*d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[Px, x] && EqQ[b*c + a*d,
 0] && EqQ[m, n] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))

Rule 1821

Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, c*x, x],
 R = PolynomialRemainder[Pq, c*x, x]}, Simp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Dist[1/(
a*c*(m + 1)), Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*(m + 2*p + 3)*x, x], x], x]] /;
FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && LtQ[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])

Rubi steps

\begin {align*} \int \frac {a+b x+c x^2}{x^3 \sqrt {1-d x} \sqrt {1+d x}} \, dx &=\int \frac {a+b x+c x^2}{x^3 \sqrt {1-d^2 x^2}} \, dx\\ &=-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {1}{2} \int \frac {-2 b-\left (2 c+a d^2\right ) x}{x^2 \sqrt {1-d^2 x^2}} \, dx\\ &=-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x}-\frac {1}{2} \left (-2 c-a d^2\right ) \int \frac {1}{x \sqrt {1-d^2 x^2}} \, dx\\ &=-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x}-\frac {1}{4} \left (-2 c-a d^2\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {1-d^2 x}} \, dx,x,x^2\right )\\ &=-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x}-\frac {1}{2} \left (a+\frac {2 c}{d^2}\right ) \text {Subst}\left (\int \frac {1}{\frac {1}{d^2}-\frac {x^2}{d^2}} \, dx,x,\sqrt {1-d^2 x^2}\right )\\ &=-\frac {a \sqrt {1-d^2 x^2}}{2 x^2}-\frac {b \sqrt {1-d^2 x^2}}{x}-\frac {1}{2} \left (2 c+a d^2\right ) \tanh ^{-1}\left (\sqrt {1-d^2 x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 69, normalized size = 0.97 \begin {gather*} \frac {(-a-2 b x) \sqrt {1-d^2 x^2}}{2 x^2}+\left (2 c+a d^2\right ) \tanh ^{-1}\left (\sqrt {-d^2} x-\sqrt {1-d^2 x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x + c*x^2)/(x^3*Sqrt[1 - d*x]*Sqrt[1 + d*x]),x]

[Out]

((-a - 2*b*x)*Sqrt[1 - d^2*x^2])/(2*x^2) + (2*c + a*d^2)*ArcTanh[Sqrt[-d^2]*x - Sqrt[1 - d^2*x^2]]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.00, size = 108, normalized size = 1.52

method result size
default \(-\frac {\sqrt {-d x +1}\, \sqrt {d x +1}\, \mathrm {csgn}\left (d \right )^{2} \left (\arctanh \left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) a \,d^{2} x^{2}+2 \arctanh \left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) c \,x^{2}+2 \sqrt {-d^{2} x^{2}+1}\, b x +\sqrt {-d^{2} x^{2}+1}\, a \right )}{2 \sqrt {-d^{2} x^{2}+1}\, x^{2}}\) \(108\)
risch \(\frac {\sqrt {d x +1}\, \left (d x -1\right ) \left (2 b x +a \right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{2 x^{2} \sqrt {-\left (d x +1\right ) \left (d x -1\right )}\, \sqrt {-d x +1}}-\frac {\left (c +\frac {a \,d^{2}}{2}\right ) \arctanh \left (\frac {1}{\sqrt {-d^{2} x^{2}+1}}\right ) \sqrt {\left (-d x +1\right ) \left (d x +1\right )}}{\sqrt {-d x +1}\, \sqrt {d x +1}}\) \(113\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2*(-d*x+1)^(1/2)*(d*x+1)^(1/2)*csgn(d)^2*(arctanh(1/(-d^2*x^2+1)^(1/2))*a*d^2*x^2+2*arctanh(1/(-d^2*x^2+1)^
(1/2))*c*x^2+2*(-d^2*x^2+1)^(1/2)*b*x+(-d^2*x^2+1)^(1/2)*a)/(-d^2*x^2+1)^(1/2)/x^2

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 98, normalized size = 1.38 \begin {gather*} -\frac {1}{2} \, a d^{2} \log \left (\frac {2 \, \sqrt {-d^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) - c \log \left (\frac {2 \, \sqrt {-d^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) - \frac {\sqrt {-d^{2} x^{2} + 1} b}{x} - \frac {\sqrt {-d^{2} x^{2} + 1} a}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="maxima")

[Out]

-1/2*a*d^2*log(2*sqrt(-d^2*x^2 + 1)/abs(x) + 2/abs(x)) - c*log(2*sqrt(-d^2*x^2 + 1)/abs(x) + 2/abs(x)) - sqrt(
-d^2*x^2 + 1)*b/x - 1/2*sqrt(-d^2*x^2 + 1)*a/x^2

________________________________________________________________________________________

Fricas [A]
time = 1.10, size = 65, normalized size = 0.92 \begin {gather*} \frac {{\left (a d^{2} + 2 \, c\right )} x^{2} \log \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{x}\right ) - {\left (2 \, b x + a\right )} \sqrt {d x + 1} \sqrt {-d x + 1}}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="fricas")

[Out]

1/2*((a*d^2 + 2*c)*x^2*log((sqrt(d*x + 1)*sqrt(-d*x + 1) - 1)/x) - (2*b*x + a)*sqrt(d*x + 1)*sqrt(-d*x + 1))/x
^2

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**2+b*x+a)/x**3/(-d*x+1)**(1/2)/(d*x+1)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)/x^3/(-d*x+1)^(1/2)/(d*x+1)^(1/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Warning, choosing root of [1,0,-4,0,%%%{
4,[2,2]%%%}] at parameters values [42,56]Warning, choosing root of [1,0,-4,0,%%%{4,[2,2]%%%}] at parameters va
lues [-9,-13](-1/2*(s

________________________________________________________________________________________

Mupad [B]
time = 6.30, size = 312, normalized size = 4.39 \begin {gather*} c\,\left (\ln \left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-1\right )-\ln \left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )\right )-\frac {\frac {a\,d^2\,{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-\frac {a\,d^2}{2}+\frac {15\,a\,d^2\,{\left (\sqrt {1-d\,x}-1\right )}^4}{2\,{\left (\sqrt {d\,x+1}-1\right )}^4}}{\frac {16\,{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-\frac {32\,{\left (\sqrt {1-d\,x}-1\right )}^4}{{\left (\sqrt {d\,x+1}-1\right )}^4}+\frac {16\,{\left (\sqrt {1-d\,x}-1\right )}^6}{{\left (\sqrt {d\,x+1}-1\right )}^6}}+\frac {a\,d^2\,\ln \left (\frac {{\left (\sqrt {1-d\,x}-1\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}-1\right )}{2}-\frac {a\,d^2\,\ln \left (\frac {\sqrt {1-d\,x}-1}{\sqrt {d\,x+1}-1}\right )}{2}-\frac {b\,\sqrt {1-d\,x}\,\sqrt {d\,x+1}}{x}+\frac {a\,d^2\,{\left (\sqrt {1-d\,x}-1\right )}^2}{32\,{\left (\sqrt {d\,x+1}-1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x + c*x^2)/(x^3*(1 - d*x)^(1/2)*(d*x + 1)^(1/2)),x)

[Out]

c*(log(((1 - d*x)^(1/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 - 1) - log(((1 - d*x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1))
) - ((a*d^2*((1 - d*x)^(1/2) - 1)^2)/((d*x + 1)^(1/2) - 1)^2 - (a*d^2)/2 + (15*a*d^2*((1 - d*x)^(1/2) - 1)^4)/
(2*((d*x + 1)^(1/2) - 1)^4))/((16*((1 - d*x)^(1/2) - 1)^2)/((d*x + 1)^(1/2) - 1)^2 - (32*((1 - d*x)^(1/2) - 1)
^4)/((d*x + 1)^(1/2) - 1)^4 + (16*((1 - d*x)^(1/2) - 1)^6)/((d*x + 1)^(1/2) - 1)^6) + (a*d^2*log(((1 - d*x)^(1
/2) - 1)^2/((d*x + 1)^(1/2) - 1)^2 - 1))/2 - (a*d^2*log(((1 - d*x)^(1/2) - 1)/((d*x + 1)^(1/2) - 1)))/2 - (b*(
1 - d*x)^(1/2)*(d*x + 1)^(1/2))/x + (a*d^2*((1 - d*x)^(1/2) - 1)^2)/(32*((d*x + 1)^(1/2) - 1)^2)

________________________________________________________________________________________